package ui;

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int q=scan.nextInt();
        int decimalNumber = Integer.parseInt(String.valueOf(q), 2);
        System.out.println(decimalNumber);
        scan.close();

    }
}
